<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
<link href="themes01/default/clientPublic.css" rel="stylesheet" type="text/css"/>
<link href="themes01/default/codeMgr.css" rel="stylesheet" type="text/css"/>
<link href="themes01/default/tabSwitch.css" rel="stylesheet" type="text/css"/>
<script language="javascript" type="text/javascript" src="DatePicker/WdatePicker.js"></script>
<script src="javascripts01/jquery-1.4.2.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(function(){
		$('tbody tr td input').click(function() {
            if ($(this).parent().parent().hasClass('selected')) {
                 $(this).parent().parent()
                    .removeClass('selected')
                    //.find(':checkbox').attr('checked',false);
            }else{
                $(this).parent().parent()
                    .addClass('selected')
                    //.find(':checkbox').attr('checked',true);
            }
        });
        // 如果复选框默认情况下是选择的，则高色.
        // $('table :checkbox:checked').parent().parent().addClass('selected');
        //简化:
        $('table :checkbox:checked').parents("tr").addClass('selected');
        //$('tbody>tr:has(:checked)').addClass('selected');

		//全选反选
		$("#CheckAll").toggle(function(){
			$(":checkbox").attr('checked',true);
			$(".t").addClass('selected');
		},function(){
			$(":checkbox").attr('checked',false);
			$(".t").removeClass('selected');
		});

		//鼠标滑过表格背景切换颜色
		$('.hover').hover(function(){
			$(this).find("td").addClass('bg');
		},function(){
			$(this).find("td").removeClass('bg');
		})
});

//判断是否选择了操作对象
function Sub(form){
	var j = 0;
	for(var i=0; i<form.elements.length; i++){
		if(form.elements[i].name == "choice[]"){
			if(form.elements[i].checked){
				j++;
			}
		}
	}
	if(j == 0){
		alert("请选择操作对象！");
		return false;
	}else{
		//确认是否要删除备份
		var r = confirm("此功能不可恢复,您确认要删除选中的备份文件吗？");
		return r == true ? true : false;
	}
}

//确认是否要导入数据
function Confirm(){
	var r = confirm("备份恢复功能将覆盖原来的数据,您确认要导入备份数据吗？");
	return r == true ? true : false;
}
</script>
<title>Office 515158 2011 OA办公系统</title>
 
</head>
<body>
<div id="Holder">
<div id="MainPage">

 
 
<div id="Subnav">
 
<ul>
<li><a href="admin.php?ac=index&fileurl=config">系统设置</a></li>
<li><a href="admin.php?ac=usergroup&fileurl=user">权限设置</a></li>
<li><a href="admin.php?ac=index&fileurl=user">账号设置</a></li>
<li><a href="admin.php?ac=log&fileurl=config">系统维护</a></li>
<li><a href="admin.php?ac=data&fileurl=config" id="Subnavb">数据备份</a></li>
<li><a href="admin.php?ac=index&fileurl=menu">菜单设置</a></li>
<li><a href="admin.php?ac=index&fileurl=keytable">权限管理</a></li>
</ul>
</div>
<div id="MainBody">


<form name="update" method="post" action="admin.php?ac=data_import&fileurl=config">
  
<div id="CodeWrap">
<div id="TabSwitch">
<ul>
<li>
<a href="admin.php?ac=data&fileurl=config">数据备份</a></li>
<li class="active"><a href="admin.php?ac=data_import&fileurl=config">数据还原</a></li>
</ul>
</div>
<div id="CodeShowBlockWrap">
<div id="QueryBar">
<div id="FilterWrap">
<label for="FilterStatus"><table width="100%" border="0" align="left" cellpadding="0" cellspacing="0">
  <tr>
    <td width="15%"><input type="checkbox" class="checkbox" value="1" name="checkall" id="CheckAll"/><b>全选</b>
    <input type="submit" name="do" value="删 除" onclick="return Sub(this.form)" /></td>
    <td width="85%" align="left">&nbsp;&nbsp;&nbsp;&nbsp;</td>
  </tr>
</table>
</label>
</div>
</div>

<div id="CodeShowBlock">
<table cellpadding="0" cellspacing="0" class="data-box"><thead>
<tr class="border-in"><th width="36"><div>选项</div></th><th class="title"><div>文件名</div></th><th class="status"><div>备份时间</div></th>
<th class="status"><div>卷号</div></th>
<th class="status"><div>操作</div></th>
</tr>
</thead><tbody>

<?php
$i = 1;
foreach($bakfile as $tb){
?>
<tr class="data-box-row"><td width="36" align="center"><input type="checkbox" name="choice[]" value="<?php echo $tb; ?>" /></td>

<td class="status"><?php echo $tb; ?></td>
<td class="status"><?php
                	//取得备份时间
			  		if(!preg_match("/_part/", $tb)){
						$str = explode(".", $tb);
						$time = substr($str[0],-10);
						//设置用在脚本中所有日期/时间函数的默认时区。
						Date_default_timezone_set("PRC");//
						echo date("Y-m-d h:i",$time);
			  		}else{
			  			//分卷
			  			$str = explode("_part", $tb);
						$time = substr($str[0],-10);
						//设置用在脚本中所有日期/时间函数的默认时区。
						Date_default_timezone_set("PRC");//
						echo date("Y-m-d h:i",$time);
			  		}
                ?></td>
<td class="status"><?php
			  		//取分卷号
			  		if(!preg_match("/_part/", $tb)){
			  			echo "1";
			  		}else{
			  			$str = explode(".", $tb);
						echo substr($str[0],-1);
			  		}
		  		?></td>
<td class="title"><a href="admin.php?ac=data_import&fileurl=config&do=save&fn=<?php echo $tb; ?>" onclick="return Confirm()">还原</a></td>
</tr>
<?php
				}
			?>


</tbody></table>
 
</div>
<div id="PageControl">
<div class="page-control">
<div class="border-in">
<table width="100%" border="0" align="left" cellpadding="0" cellspacing="0">
  <tr>
    <td width="15%">&nbsp;&nbsp;<input type="checkbox" class="checkbox" value="1" name="checkall" id="CheckAll"/><b>全选</b>
    <input type="submit" name="do" value="删 除" onclick="return Sub(this.form)" /></td>
    <td width="85%" align="left">&nbsp;&nbsp;&nbsp;&nbsp;</td>
  </tr>
</table>
  

</div>
</div>
</div>
</div>
</div>
 </form>
</div>
</div>
</div>
 
<script language="javascript" src="javascripts01/tangram-1.3.1.js" type="text/javascript"></script>
<script language="javascript" src="javascripts01/elf.js" type="text/javascript"></script>
<script language="javascript" src="javascripts01/union.js" type="text/javascript"></script>
<script language="javascript" src="javascripts01/codeMgr.js" type="text/javascript"></script>
 
</body>
</html>
